package be.pluyckx.batteryprogress.utils;

import be.pluyckx.batteryprogress.application.Constants;

/**
 * Created by Philip on 21/08/13.
 */
public class DateTime {
  public static String toTimeString(long seconds) {
    int hour = (int) (seconds / 60 / 60);
    int min = (int) ((seconds - hour * 60 * 60) / 60);
    int sec = (int) (seconds - (hour * 60 + min) * 60);

    return Constants.doubleZeroFormat.format(hour) + ":" + Constants.doubleZeroFormat.format(min) + ":" + Constants.doubleZeroFormat.format(sec);
  }

  private DateTime() {

  }
}
